<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>富锦市农业数据调研分析系统——登录</title>
<link rel="stylesheet" href="__PUBLIC__/css/common.css" />
<link rel="stylesheet" href="__PUBLIC__/css/style.css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
<style type="text/css">
.imgcode{
	width:145px;
	height:28px;
	margin-left:-3px;
}


</style>
</head>

<body>

<div class="login">
	<div class="loginWindow">
		<!--账户登录-->
		<div class="loginUp">
			<div class="loginUpTitle">账户登录</div>
			<div class="loginUpUser">
				<input type="text" placeholder="账号/手机/邮箱" autocomplete="off" class="userName" tabindex="1">
			</div>
			<div class="loginUpPwd">
				<input type="password" placeholder="密码" class="pwd" tabindex="2">
			</div>
			<div class="loginUpVer">
				<input type="txt" placeholder="验证码" id="code" class="ver" tabindex="3"> 
				<span class="ver">
					<img src="{:U('Login/verify')}" onClick="this.src=this.src+'?'+Math.random()" alt="" class="imgcode" />
				</span>
			</div>
			<div class="submitBtn" tabindex="4">登&nbsp;&nbsp;录</div>
		</div>
		<div class="loginDown clearfix"><a class="link left" href="" target="_blank">注册管理员</a><a class="link right" href="" target="_blank">忘记密码</a></div>
	</div>
</div>
</body>

</html>
<script type="text/javascript">
		$(".submitBtn").click(function(){
		var userName = $(".userName").val();
		var pwd = $(".pwd").val();
		var code =$("#code").val();
		if (userName == "") {
			alert("请输入帐号/手机号/邮箱!");
			return false;
		}
		if (pwd == "") {
			alert("请输入密码!");
			return false;
		}
		if (code == "") {
			alert("请输入验证码!");
			return false;
		}

		var params={
		userName:userName,
		pwd:pwd,
   		code:code
		}
		$.post('{:U('Login/logindo')}',$.param(params),function(data){
      	if(data.status == 100){
        alert(data.info);
        window.location.href="{:U('Index/Index')}";
        
      	}else{
      	 alert(data.info);
     	}



})



		})




</script>